Skip to content

Conversation

@Losecow
Copy link
Contributor

@Losecow Losecow commented Jan 16, 2026

개요

ERD를 기준으로 DB 모델을 정리하고,
Alembic을 사용해 initial migration을 생성하여
이후 모든 기능 개발의 DB 스키마 기준점을 확정

본 PR은 후속 개발에 앞서 DB 구조를 확정하기 위한 작업입니다.

관련 이슈

작업 내용

  • ERD 기준으로 models.py 정리
  • Alembic initial migration 생성
  • 기존에 비어 있던 legacy initial migration 제거
  • .gitignore 에 .env 와 로컬 환경용 설정 docker-compose.yml 추가

테스트 결과

  • Alembic upgrade head 정상 동작 확인
  • 모든 테이블 및 enum 생성 정상 확인
  • 기존 migration 충돌 없음

기타

  • 본 PR은 DB 스키마의 기준점 역할을 합니다
  • 이후 기능 브랜치는 본 스키마를 기준으로 작업하면 됩니다

…postgresql-with-orm

5 feat sync postgresql with orm
@Losecow Losecow self-assigned this Jan 16, 2026
@Losecow Losecow requested review from a team, 248Kobe, Jangmyun, SeoGyeongmi, YoungRheeCho and haeyun1 and removed request for a team January 16, 2026 14:18
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker-compose.yml 이 서버 컴 상에서 up 명령어로 실행되도록 deploy.yml ci/cd 설정 해놨는데 지우면 안됨.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로컬에서 돌리려다 잘못 만져서 빼고 푸시함...
전 버전에서 가져와서 다시 넣겠습니다

.gitignore Outdated
postgres_data/
postgres_data/

.env
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env 파일은 이미 fastapi-backend 디렉토리에서 ignore 되어있는데 왜 중복으로 하는지?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

젠장 거기에 있는지 모르고 또 추가했습니다

.gitignore Outdated

.env

.python-version
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.python-version 은 파이썬 버전 관리툴로 도입한 uv를 위해 필요함.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK !

Torrey = "Torrey"
JangGiRyeo = "JangGiRyeo"
Kuyper = "Kuyper"
SonYangwon = "SonYangwon"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JangGiRyeo 는 한글 음절마다 Uppercase인데 SonYangwon은 lowercase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 이럴수가

@Jangmyun
Copy link
Collaborator

추가적으로 각 모델 작성시마다 커밋 필요 (거의 line-by-line 수준 커밋)

- Align models.py with ERD
- Add initial Alembic migration as DB baseline
- Remove empty legacy migration
- Ignore docker-compose.yml for local environment
@Losecow Losecow force-pushed the 8-feat/initial-db-schema branch from 9f1781d to 5126e7d Compare January 17, 2026 05:33
@Losecow Losecow changed the title feat: ERD 기반 DB 모델 정리 및 Alembic initial migration 적용 [Feat]: ERD 기반 DB 모델 정리 및 Alembic initial migration 적용 Jan 17, 2026
@Losecow
Copy link
Contributor Author

Losecow commented Jan 17, 2026

gitignore 관련 수정사항 먼저 반영하여 커밋 추가했습니다.
모델 수정은 이어서 반영하겠습니다.

@Losecow
Copy link
Contributor Author

Losecow commented Jan 17, 2026

모델 수정 완료했습니다.

  • UserStatus Enum - SonYangWon uppercase로 수정

Copy link
Collaborator

@Jangmyun Jangmyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.python-version 이 프로젝트 root 말고 fastapi-backend 에 있어야됨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: ERD 기반 DB 모델 정리 및 Alembic initial migration 적용

3 participants